try {
    $files = Get-ChildItem ./dist/ -Filter *.js;
    #Write-Output $files;
    foreach($file in $files) {
        $src = (Get-Location).Path+"\dist\"+([System.Text.RegularExpressions.Regex]::Match($file.Name, '^(.*)\.js$').Value);
        Remove-Item $src;
    }
    Remove-Item ./dist;
}
finally {
    Clear-Host;
    rollup -c;
}